package wiki.hitime.stl.daq.bean.bo;

import org.springframework.util.Assert;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

/**
 * @author zhangdaoping
 * @create 2019-07-23 11:08
 */
public class MsgParamMap<K, V> extends HashMap<K, V> {

    private static final List<String> MSG_KEY = Arrays.asList("executeDate",
            "executeRuleName",
            "firstData",
            "lastData",
            "dataCount");

    @Override
    public V put(K key, V value) {
        Assert.isTrue(MSG_KEY.contains(key.toString()), "设置的消息参数不能为定义之外的");
        return super.put(key,value);
    }
}
